import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class coin here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */


public class coin  extends Actor
{
    private int hitPoints;
    
    private retroWorld theWorld;
    private GreenfootImage monedasBar;
    
    Simon simon;
    Label label;
    
    /** Constructor - initialize Health points to 100
     * 
     */
    public coin()
    {
        hitPoints=0;
        label = new Label("Coins 0");
        
    }
    
    public void addedToWorld(World world)
    {
        theWorld = (retroWorld)world;
        simon = theWorld.getSimon();
        theWorld.addObject(label,getX()+20,getY());
    }
    
    public void act() 
    {
        changeHealthText();
    }
    
    /** Change the text representation in the Health bar
     * 
     */
    public void changeHealthText(){
       label.setText("Coins "+ hitPoints);        
    }
    
        public void moneda(){
        hitPoints++;
    }
    
    /** return our hit points
     * 
     */
    public int getHitPoints(){
        return hitPoints;
    }
}